package com.car.loan.project.xr.service;

import com.car.loan.project.xr.domain.LoanAlbum;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.Collection;
import java.util.List;

/**
 * 相册Service接口
 *
 * @author ruoyi
 * @date 2019-11-03
 */
public interface ILoanAlbumService {

    /**
     * 查询相册
     *
     * @param id 相册ID
     * @return 相册
     */
    public LoanAlbum selectLoanAlbumById(Long id);

    /**
     * 查询相册列表
     *
     * @param loanAlbum 相册
     * @return 相册集合
     */
    public List<LoanAlbum> selectLoanAlbumList(LoanAlbum loanAlbum);

    /**
     * 查询分页数据
     */
    IPage<LoanAlbum> selectPage(IPage<LoanAlbum> page, QueryWrapper<LoanAlbum> queryWrapper);

    /**
     * 新增相册
     *
     * @param loanAlbum 相册
     * @return 结果
     */
    public int insertLoanAlbum(LoanAlbum loanAlbum);

    /**
     * 修改相册
     *
     * @param loanAlbum 相册
     * @return 结果
     */
    public int updateLoanAlbum(LoanAlbum loanAlbum);

    /**
     * 批量删除相册
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteLoanAlbumByIds(Collection<Long> ids);

    /**
     * 删除相册信息
     *
     * @param id 相册ID
     * @return 结果
     */
    public int deleteLoanAlbumById(Long id);

    /**
     * 按照类型和id删除附件信息
     * @param id
     * @param type
     * @return
     */
    int deleteLoanAlbumByIdAndType(Long id, Integer type);
}
